/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Bayu
 */
@Entity
@Table(name = "pf")
@NamedQueries({@NamedQuery(name = "Pf.findAll", query = "SELECT p FROM Pf p"), @NamedQuery(name = "Pf.findById", query = "SELECT p FROM Pf p WHERE p.id = :id"), @NamedQuery(name = "Pf.findByPriceday", query = "SELECT p FROM Pf p WHERE p.priceday = :priceday"), @NamedQuery(name = "Pf.findByPricecumm", query = "SELECT p FROM Pf p WHERE p.pricecumm = :pricecumm"), @NamedQuery(name = "Pf.findByPcsday", query = "SELECT p FROM Pf p WHERE p.pcsday = :pcsday"), @NamedQuery(name = "Pf.findByPcscumm", query = "SELECT p FROM Pf p WHERE p.pcscumm = :pcscumm"), @NamedQuery(name = "Pf.findByDate", query = "SELECT p FROM Pf p WHERE p.date = :date")})
public class Pf implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "priceday")
    private double priceday;
    @Basic(optional = false)
    @Column(name = "pricecumm")
    private double pricecumm;
    @Basic(optional = false)
    @Column(name = "pcsday")
    private double pcsday;
    @Basic(optional = false)
    @Column(name = "pcscumm")
    private double pcscumm;
     //Must edit @Basic for data tipe data
    @Basic()
    @Column(name = "date")
    @Temporal(TemporalType.DATE)
    private Date date;

    public Pf() {
    }

    public Pf(Long id) {
        this.id = id;
    }

    public Pf(Long id, double priceday, double pricecumm, double pcsday, double pcscumm, Date date) {
        this.id = id;
        this.priceday = priceday;
        this.pricecumm = pricecumm;
        this.pcsday = pcsday;
        this.pcscumm = pcscumm;
        this.date = date;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public double getPriceday() {
        return priceday;
    }

    public void setPriceday(double priceday) {
        this.priceday = priceday;
    }

    public double getPricecumm() {
        return pricecumm;
    }

    public void setPricecumm(double pricecumm) {
        this.pricecumm = pricecumm;
    }

    public double getPcsday() {
        return pcsday;
    }

    public void setPcsday(double pcsday) {
        this.pcsday = pcsday;
    }

    public double getPcscumm() {
        return pcscumm;
    }

    public void setPcscumm(double pcscumm) {
        this.pcscumm = pcscumm;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pf)) {
            return false;
        }
        Pf other = (Pf) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.Pf[id=" + id + "]";
    }

}
